<!DOCTYPE html>
<!--
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/Project/PHP/PHPProject.php to edit this template
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title>demo_2</title>
    </head>
    <body>
        <div><input type="text" id="search"><input type="button" value="搜索" onclick="location.href='/xss_demo/demo_1.php?search='+document.getElementById('search').value"></div>
        <div>
            搜索"
            <script>
                document.write((new URLSearchParams(window.location.search)).get('search'));
            </script>
            "
        </div>
        <div>
            搜索结果
        </div>
    </body>
</html>
